<?php if (!defined('THINK_PATH')) exit();?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <title><?php echo getStoreName($_GET['local_id']);?>-商品分类</title>
    <link rel="stylesheet" href="/Public/Home/css/category.css">
    <!--不识别数字为手机-->
<meta name="format-detection" content="telephone=no, email=no"/>
<!--通用js-->
<?php if(isset($signPackage) && !empty($signPackage)){ ?>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js?v=201704270010"></script>
<?php } ?>
<script type="text/javascript" src="/Public/Home/js/require.js"></script>
<script type="text/javascript" src="/Public/Home/js/baseLoading.js?v=201705240001"></script>
<script src="/Public/Home/js/jquery.min.js" ></script>
<script src="/Public/Home/js/pincode-input.js" ></script>
<script src="/Public/Home/js/parabola.js" ></script>
<script src="/Public/Home/js/lazyload/jquery.lazyload.min.js"></script>
<script type="text/javascript">
    _global.isLogin = !!"<?php echo $wx_member_id; ?>";
	var isWxShareDiy = typeof yc_share_diy === "undefined" ? false : yc_share_diy;
	var yc_wx_shareImgPath = "";
	<?php if(isset($weixin_logo) && !empty($weixin_logo)){ ?>
		yc_wx_shareImgPath = "/Uploads/<?php echo ($weixin_logo["image"]); ?>";
	<?php } ?>
    var yc_pass_arr = {'local_id':"<?php echo I('local_id',1);?>",'top_local_id':"<?php echo I('top_local_id',1);?>"};
	if(parseInt(yc_pass_arr["local_id"]) == 21){
		_global.isStopSell = true;
	}
    <?php if(isset($signPackage) && !empty($signPackage)){ ?>
        _global.isWeiXinLoad = true;
        var isEnableLocation = typeof yc_wx_location === "undefined" ? false : yc_wx_location;
        var yc_wx_options = {
            "enableLocation" : isEnableLocation,
            "refuseCallback" : function(){},
            "mapCallback" : function(){},
            "config" : {
                debug: false,
                appId: '<?php echo $signPackage["appId"];?>',
                timestamp: '<?php echo $signPackage["timestamp"];?>',
                nonceStr: '<?php echo $signPackage["nonceStr"];?>',
                signature: '<?php echo $signPackage["signature"];?>',
                jsApiList: [
                    'checkJsApi'
                ]
            }
        };
        var isInHeader = typeof yc_wx_useInHeader === "undefined" ? true : yc_wx_useInHeader;
        if(isInHeader){
            wxAutoConfig(yc_wx_options);
        }
    <?php } ?>
</script>
    <script type="text/javascript">
		_global.isDiyLazyLoad = true;
	</script>
</head>
<body>
<div class="warp" style="padding-bottom:1.1rem;">
    <div class="category-bar">
        <!--<p class="city">全部分类</p>-->
<!--        <p class="tab">
            <a href="<?php echo url('category/index', array('local_id' => $storeData['local_id']),'');?>" class="active"><?php echo ($storeData["local_name"]); ?></a>
            &lt;!&ndash;如果是全国送&ndash;&gt;
            <?php if ($storeData['is_self'] == 1){ ?>
            <a href="<?php echo url('category/index', array('local_id' => $top_self_store['local_id']),'');?>"><?php echo $top_self_store['local_name'];?></a>
            <?php }else { ?>
            <a href="/category/index/local_id/<?php echo $self_store['local_id'];?>/top_local_id/<?php echo $storeData['local_id'];?>"><?php echo $self_store['local_name'];?></a>
            <?php } ?>
        </p>-->
        <p class="tab">
            <?php if ($storeData['is_self'] != 1){ ?>
            <a href="<?php echo url('category/index', array('local_id' => $storeData['local_id'], 'top_local_id' => 11),'');?>" <?php if($storeData['local_id'] != 11): ?>class="active"<?php endif; ?> ><?php echo ($storeData["local_name"]); ?></a>
            <!--如果是全国送-->
            <a href="<?php echo url('category/index', array('local_id' => '11', 'top_local_id' => $storeData['local_id']),'');?>" <?php if($storeData['local_id'] == 11): ?>class="active"<?php endif; ?> >全国送</a>
            <?php }else{ ?>
            <a href="<?php echo url('category/index', array('local_id' => $top_self_store['local_id'], 'top_local_id' => 11),'');?>" <?php if($storeData['local_id'] != 11): ?>class="active"<?php endif; ?> ><?php echo ($top_self_store["local_name"]); ?></a>
            <!--如果是全国送-->
            <a href="<?php echo url('category/index', array('local_id' => '11', 'top_local_id' => $top_self_store['local_id']),'');?>" <?php if($storeData['local_id'] == 11): ?>class="active"<?php endif; ?> >全国送</a>
            <?php } ?>
        </p>
        <a href="<?php echo url('search/index');?>" class="search"></a>
    </div>
    <div class="fixed-category">
        <!-- 左侧 -->
        <div class="left-menu">
            <div class="menu-content">
                <ul>
                    <?php if(is_array($parent)): foreach($parent as $k=>$v): ?><li><a href="javascript:void(0);"><?php echo ($v["cat_name"]); ?></a></li><?php endforeach; endif; ?>
                </ul>
            </div>
        </div>
        <!-- 右侧 -->
        <div class="right-box">
            <div class="right-content">
                <!-- 本周促销 -->
                <div class="week-promotion">
                    <?php if(is_array($parent)): foreach($parent as $k=>$v): ?><p class="category-promote img_<?php echo ($k); ?>"><a href="<?php echo url('GoodsList/index', array('category_id'=>$v['store_cat_id'],'local_id' => $storeData['local_id']),'');?>"><img class="img-lazyload" src="/Public/Home/images/blank.png" data-original="/Uploads/<?php echo ($parent[$k]['cat_img']); ?>"></a></p><?php endforeach; endif; ?>
                </div>
                <!-- 栏目分类 -->
                <div class="second-category">
                    <h3>栏目分类</h3>
                    <?php if(is_array($second)): foreach($second as $k=>$second_val): ?><div class="category-list second_<?php echo ($k); ?>" >
                        <?php if(is_array($second_val)): foreach($second_val as $key=>$v): ?><a href="<?php echo url('GoodsList/index', array('category_id'=>$v['store_cat_id'],'local_id' => $storeData['local_id']),'');?>"><img class="img-lazyload" src="/Public/Home/images/blank.png" data-original="/Uploads/<?php echo ($v['cat_img']); ?>" alt=""><p><?php echo ($v["cat_name"]); ?></p></a><?php endforeach; endif; ?>
                            <!--<a href="" class="seeMore">查看全部>></a>-->
                        </div><?php endforeach; endif; ?>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 网站主菜单 -->
<link rel="stylesheet" href="/Public/Home/css/menu.css">
<div class="fixed-main-menu">

    <?php
 $home_default_local_id = (!empty($_GET['top_local_id']) && $_GET['top_local_id'] != '11') ? $_GET['top_local_id'] : $default_local_id; ?>
    <?php if ($_GET['local_id'] == '11'){ ?>
        <a href="<?php echo url('store/index',['local_id' => $home_default_local_id, 'top_local_id' => 11]);?>" class="home <?php echo CONTROLLER_NAME == 'Store' ? 'active' : ''; ?>"><span></span>
            <p>首页</p>
        </a>
    <?php }else { ?>
        <a href="<?php echo url('store/index',['local_id' => $storeData['local_id']]);?>" class="home <?php echo CONTROLLER_NAME == 'Store' ? 'active' : ''; ?>"><span></span>
            <p>首页</p>
        </a>
    <?php } ?>

    <?php if ($_GET['local_id'] == '11'){ ?>
    <a href="<?php echo url('category/index', ['local_id' => $home_default_local_id, 'top_local_id' => 11]);?>" class="category <?php echo CONTROLLER_NAME == 'Category' ? 'active' : ''; ?>"><span></span>
        <p>分类</p></a>
    <?php }else { ?>
    <a href="<?php echo url('category/index', ['local_id' => $storeData['local_id']]);?>" class="category <?php echo CONTROLLER_NAME == 'Category' ? 'active' : ''; ?>"><span></span>
        <p>分类</p></a>
    <?php } ?>

    <?php if ($_GET['local_id'] == '11'){ ?>
    <a href="<?php echo url('store/index', ['local_id' => '11']);?>" class="store-way <?php echo ($_GET['local_id'] == '11') ? 'active' : '';?>"><span></span><p>全国送</p></a>
    <?php }else { ?>
    <?php $top_local_id = (!empty($_GET['local_id'])) ? $_GET['local_id'] : $storeData['local_id']; ?>
    <a href="<?php echo url('store/index', ['local_id' => '11','top_local_id' => $top_local_id]);?>" class="store-way <?php echo ($_GET['local_id'] == '11') ? 'active' : '';?>"><span></span><p>全国送</p></a>
    <?php } ?>

    <a href="<?php echo url('carts/cart');?>" class="cart <?php echo CONTROLLER_NAME == 'Carts' ? 'active' : ''; ?> clickable_shou"><span></span>
        <p>购物车</p>

            <?php if(userCartNum()): ?><label class="public-cart-number"><?php echo userCartNum();?></label><?php endif; ?>
    </a>
    <a href="<?php echo url('Member/index');?>" class="mine <?php echo CONTROLLER_NAME == 'Member' ? 'active' : ''; ?> clickable_shou" id="menuMemberPopup"><span></span><p>我的</p></a>
</div>
<link rel="stylesheet" href="/Public/Home/css/phoneCheck.css">
<div class="alert-popup bindPhone">
    <p>你还没有绑定手机号，为了你更好的体验怡臣请先绑定手机号。</p>
    <p><a href="javascript:void(0);" class="cancel">先看看</a><a href="javascript:void(0);" class="confirm">绑定手机</a></p>
</div>
<div class="bindPhone-box" style="display:none">
    <span class="close"></span>
    <div class="inputInfo">
        <h1>验证手机号</h1>
        <ul>
            <li><input type="text" placeholder="请输入绑定手机号" id="phone"> <a href="javascript:void(0);" id="yzCaptcha">获取验证码</a></li>
            <li>
                <div class="pincode-input-container touch" id="pincode-list">
                    <div style="display: none;">
                        <input type="password" readonly pattern="[0-9]*" inputmode="numeric" id="preventautofill" autocomplete="off">
                    </div>
                    <div class="touchwrapper touch4">
                        <input type="password" pattern="[0-9]*" readonly inputmode="numeric" maxlength="4" autocomplete="off" class="form-control pincode-input-text">
                        <table class="touchtable">
                            <tbody>
                            <tr>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td class="last"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="text-danger pincode-input-error"></div>
                </div>
                <input type="text" id="code-input" style="display:none;">
                <p class="code-tips" style="display:none;"></p>
            </li>
        </ul>
    </div>
    <div class="success" style="display:none;">
        <ul>
            <li>
                <span>绑定成功!</span>
                <p>该窗口<i>3</i>秒后自动关闭</p>
            </li>
        </ul>
    </div>
</div>

<script type="text/javascript">
    $(".clickable_shou").click(function(e){
        _global.checkPhoner.reset();
        _global.checkPhoner.run(e, $(this).attr('href'));
    });
</script>


<script type="text/javascript" src="/Public/Home/js/goods/category.js?v=2017020270012"></script>
</body>
</html>